\documentclass[a4paper,12pt,oneside,titlepage,headings]{report}
\usepackage[latin1]{inputenc}
\usepackage{textcomp}
\usepackage{multirow}
\usepackage{amsmath}
\usepackage[pdftex]{color, graphicx}
\usepackage[centerlast]{caption}

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LO]{\leftmark}
\fancyfoot[CO,LE]{\thepage}

\newtheorem{definition}{Definition}

\renewcommand{\chaptermark}[1]{\markboth{\textbf{\thechapter. #1}}{}}
\renewcommand{\sectionmark}[1]{\markright{\textbf{\thesection. #1}}}

\renewcommand{\headrulewidth}{0.6pt}
\setlength{\headheight}{1.5\headheight}

\usepackage{color}
\definecolor{gray97}{gray}{.97}
\definecolor{gray75}{gray}{.75}
\definecolor{gray45}{gray}{.45}

\usepackage{listings}
% From http://crysol.inf-cr.uclm.es/node/909
\lstset{ frame=Ltb,
     framerule=0pt,
     aboveskip=0.5cm,
     framextopmargin=3pt,
     framexbottommargin=3pt,
     framexleftmargin=0.4cm,
     framesep=0pt,
     rulesep=.4pt,
     backgroundcolor=\color{gray97},
     rulesepcolor=\color{black},
     %
     stringstyle=\ttfamily,
     showstringspaces = false,
     basicstyle=\small\ttfamily,
     commentstyle=\color{gray45},
     keywordstyle=\bfseries,
     %
     numbers=left,
     numbersep=15pt,
     numberstyle=\tiny,
     numberfirstline = false,
     breaklines=true,
     %
     tabsize=2,
   }

% minimizar fragmentado de listados
\lstnewenvironment{listing}[1][]
   {\lstset{#1}\pagebreak[0]}{\pagebreak[0]}

\lstdefinestyle{consola}
   {basicstyle=\scriptsize\bf\ttfamily,
    backgroundcolor=\color{gray75},
   }

\lstdefinestyle{C++}
   {language=C++,
    basicstyle=\scriptsize\ttfamily,
   }

\thispagestyle{empty}  % No numbering in this page.

\begin{document}

\begin{minipage}[c][3cm][c]{1em}   % Empty space.
\end{minipage}

\begin{center}
\fontsize{32}{32}\selectfont
	\textbf{{Computer Graphics}}\\[1.5cm]
\fontsize{22}{22}\selectfont
	\textbf{{Final Project}}\\[1.5cm]

\fontsize{18}{18}\selectfont
June, 2010\\[8cm]
\end{center}

\begin{flushright}
\fontsize{14}{14}\selectfont
        \textbf{Javier Matas de Haro}\\[.3cm]
	\textbf{Roberto Pozuelo Dominguez}\\[.3cm]
	University of Castilla-La Mancha\\[.5cm]
\end{flushright}

\tableofcontents

\renewcommand{\baselinestretch}{1,5}
\large\normalsize

\chapter{Introduction}
\label{Chap:Introduction}

This document describes the final project of Computer Graphics (CG)
09/10. In short, the pursued goal is to design and implement a basic
3D modelling environment which is scalable and independent of data
representation. In our case, the job is to make the import and export 
objects. For this, we use the structures used by Javier and Gabriel. 
Furthermore, we create our own classes, which inherit their own, in 
order to upgrade the structures. We create the function import to add
a list of objects from an orej file. We use the export function 
as if we save a scene. The scene would remain stored in a xml file.
We make the documentation of the proyect together because we have made 
the code at the same time. We have made the same work. We have worked 
always together for if we needed help.

\chapter{Methodology}
\label{Chap:Methodology}

\section{Working in group}
\label{Chap:Methodology:WorkGroup}

We are the third group. We implement the part of the importer and
the exporter. We have to use some classes from Javier and Gabriel
to do our part. 
It is important to remark that we worked always together. We stay 
together for if some problems appears and for to do the job more easy.
Two heads think more than one. 

\section{Mercurial repository}

First, we think that the repository don't be the best idea 
because we haven't worked ever with any repository. Also, we haven't
recieved a good formation to know how to work with this repository.
We consider the following points as the main problems when working 
with the repository:

\begin{itemize}
\item Add the codes on the repository has became in a odissey because 
  many times don't allow us (with \textit{hg add}, \textit{hg ci} \& \textit{hg push}).
\item When we want to download the code from the repository, as it 
  has not upload well, we lose everything we had done.
\item It was a handicap the lack of experience when we work with a 
  repository.
\end{itemize}

\chapter{Design}
\label{Chap:Design}

We use the following classes:

\begin{itemize}
\item importer
\item exporter
\item vertice
\end{itemize}

The description of these functions and classes are...

\section{Importer}
\label{Chap:Design:Importer}

In the importer function we take an orej file to do a list of objects 
and then return it. We take all the vertex one by one in this file and 
save them into the structures defined by Javier and Gabriel. After 
doing this, we do the same operations with all the triangles.
In the importer function, we read the orej file and called to the 
import aux function for every object in the file. Import aux has to save 
the structure of one object and then return it.

\section{Exporter}
\label{Chap:Design:Exporter}

The exporter function consists in create a xml file where we save, with 
Yafaray format, the scene than we have.
First, we take the structures of the objects in this scene and then
print the vertices followed by the triangles.
Furthermore, we need to take in mind that the camera is important too.
We have a function to put spaces in the xml file.

\section{Vertice}
\label{Chap:Design:Vertice}

This class inherited from Vertex3D all functions and atributes. 
We create this class because we need an index for each vertex. 
We need those indexes to generate the xml file because each triangle is defined 
by three vertexes, who are identified by this numbers. 
Therefore, we have implemented some functions to get this atribute and set it.

\chapter{Opinion}
\label{Chap:Opinion}

We think this final proyect would be better if we would have had more conversation
 between partners. In fact, the most of the problems we found in the proyect are related with
this. Some of our best problems could be solved with a little conversation with the rest of
 classmates.
Also, we think that at the beginning it must be some basic code to facilitate the use of structures.
Little changes in the classes of our partners forced us to change our code too. 

\end{document}
